package javaStudy.线程;

public class MyThread extends Thread{
    //getName()获取线程名字
    //setName()设置线程名字
    public MyThread(){}
    public MyThread(String name){
        super(name);
    }
    @Override
    public void run() {
        for (int i=0;i<100;i++){
            System.out.println(getName()+":"+i);
        }
    }
}
